<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>登录页面</title>
</head>
<body>
    <span th:if="${param.error}">账号或密码错误</span>
    <!--/login是SpringSeccurity自带的登录接口-->
    <form action="/login" method="post">
        <!--表单的name必须是username和password-->
        <input type="text" name="username" placeholder="请输入账号"><br>
        <input type="password" name="password" placeholder="请输入密码"><br>
        <input type="checkbox" name="rememberMe" value="true">记住我<br>
        <input type="hidden" th:name = "${_csrf.parameterName}" th:value = "${_csrf.token}" />
        <input type="submit" value="登录">
    </form>
</body>
</html>